From: Florian Müllner Date: Fri, 3 Oct 2014 14:33:37 +0000 (+0200) Subject: screenshot: Respect lockdown settings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2051 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f9d909f98558f886d83875fd0361906d75bb0dc1;p=gnome-shell.git screenshot: Respect lockdown settings We allow users/admins to lock down disk writes, respect that when taking screenshots. https://bugzilla.gnome.org/show_bug.cgi?id=737846 --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 81094dd20..45f013c8e 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -67,12 +67,15 @@ const ScreenshotService = new Lang.Class({ this._screenShooter = new Map(); + this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' }); + Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null); }, _createScreenshot: function(invocation) { let sender = invocation.get_sender(); - if (this._screenShooter.has(sender)) { + if (this._screenShooter.has(sender) || + this._lockdownSettings.get_boolean('disable-save-to-disk')) { invocation.return_value(GLib.Variant.new('(bs)', [false, ''])); return null; }